Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix color contrast issue in light mode #56272

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 16, 2024

Attributes are being highlighted as #f00 on a background of #f2f2f2 in light mode. That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement of WCAG 2.1 AA. This changes the attribute color to #d00, which has a color contrast of 5.09:1 meeting the 4.5:1 requirement.

By the way, I'm not sure if we document it anywhere, but it would probably be useful to document that we strive for WCAG 2.1 AA compliance (and not AAA compliance which might not even be possible, or some other WCAG version compliance).

Before:

image

After:

image

Attributes are being highlighted as #f00 on a background of #f2f2f2.
That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement
of WCAG 2.1 AA. This changes the attribute color to #d00, which has a
color contrast of 5.09:1 meeting the 4.5:1 requirement.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/nodejs-website

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Dec 16, 2024
@AugustinMauroy
Copy link
Member

LGTM !

@Trott Trott added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 17, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 18, 2024
@nodejs-github-bot nodejs-github-bot merged commit e477978 into nodejs:main Dec 18, 2024
22 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in e477978

@Trott Trott deleted the contrast branch December 18, 2024 18:38
aduh95 pushed a commit that referenced this pull request Dec 18, 2024
Attributes are being highlighted as #f00 on a background of #f2f2f2.
That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement
of WCAG 2.1 AA. This changes the attribute color to #d00, which has a
color contrast of 5.09:1 meeting the 4.5:1 requirement.

PR-URL: #56272
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Claudio Wunder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants